package sending.lazyviewpager;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

/**
 * @Author Hu
 * @Time 2017/4/18 --11:59.
 * @Email 87683202@qq.com
 */
public class TestFragment extends BaseFragment {
    TextView textView;
    static String PAGER_NO="pager_no";

    @Override
    protected int getLayoutId() {
        return R.layout.fragment_main;
    }

    @Override
    protected void initView() {
        textView = (TextView) convertView.findViewById(R.id.section_label);
    }

    @Override
    protected void initData() {
        Log.e("initData===",getArguments().getInt(PAGER_NO)+"--");
        textView.setText(getArguments().getInt(PAGER_NO)+"////////-----");
    }

    public static TestFragment newInstance(int i, boolean b) {
        TestFragment myPagerFragment = new TestFragment();
        Bundle arg = new Bundle();
        arg.putInt(PAGER_NO, i);
        myPagerFragment.setArguments(arg);
        return myPagerFragment;

    }
}
